package bancosys.tec.persist.entities.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import jmine.tec.persist.annotation.Alias;

import org.hibernate.annotations.Filter;
import org.hibernate.annotations.FilterDef;
import org.hibernate.annotations.ParamDef;

import bancosys.tec.persist.bussobj.PersistableBusinessObject;

@Entity
@Alias("SOMBEA")
@FilterDef(name = "myFilter", defaultCondition = "id in ( select entry.entityId from $SCHEMA_NAME$.cwcred cwc join $SCHEMA_NAME$.cwentry entry ON entry.cred = cwc.id where cwc.id in ( :param)  )", parameters = { @ParamDef(type = "long", name = "param") })
@Filter(name = "myFilter")
public class SomeBean extends PersistableBusinessObject {

    @Id
    @GeneratedValue
    public Long id;

}
